package com.example.notification_013;

import android.R.animator;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    
    public void click(View view){
    	NotificationManager notificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
    	NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
    	.setSmallIcon(android.R.drawable.sym_def_app_icon)
    	.setContentTitle("test")
    	.setContentText("this is a notification test")
    	.setTicker("I am your lover");
    	Notification notification = builder.build();
    	notificationManager.notify(1, notification);
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
}
